package com.wicket.okrcalc.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcalc.biz.service.TaskService;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.wicket.okrcalc.common.ro.OkrResult;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/calc/task/")
public class TaskController {

  @Autowired
  TaskService taskService;
/**
   * D4-查询汇报任务计算相关配置详情(公共)
   */
    @PostMapping("queryConfigOfReportingTaskCalcDetailCom")
    public OkrResult<QueryConfigOfReportingTaskCalcDetailComRespDto> queryConfigOfReportingTaskCalcDetailCom(@RequestBody @Validated QueryConfigOfReportingTaskCalcDetailComReqDto reqDTO){
    return OkrResult.success(taskService.queryConfigOfReportingTaskCalcDetailCom(reqDTO));
    }
/**
   * D4提交评价标准数据(公共)
   */
    @PostMapping("commitEvaStandardDataCom")
    public OkrResult<CommitEvaStandardDataComRespDto> commitEvaStandardDataCom(@RequestBody @Validated CommitEvaStandardDataComReqDto reqDTO){
    return OkrResult.success(taskService.commitEvaStandardDataCom(reqDTO));
    }
/**
   * D4-判断汇报任务评价工作是否完成(公共)
   */
    @PostMapping("judgeTaskEvaIsDoneCom")
    public OkrResult<JudgeTaskEvaIsDoneComRespDto> judgeTaskEvaIsDoneCom(@RequestBody @Validated JudgeTaskEvaIsDoneComReqDto reqDTO){
    return OkrResult.success(taskService.judgeTaskEvaIsDoneCom(reqDTO));
    }
}
